//
// Created by xwt
//

#ifndef AB_UTILS_AB_SHM_HPP
#define AB_UTILS_AB_SHM_HPP


namespace anbantech {

    class ab_shm {
    private:
        key_t key_;
        size_t size_;
        int shmid_;
        void* data_;
    public:
        ab_shm();
        ~ab_shm();
        int id() const;
        int create(key_t key, size_t size);
        void write(const char* message);
        [[nodiscard]] const char* read() const;
    };

} // anbantech

#endif //AB_UTILS_AB_SHM_H
